YES(O(1),O(n^2)) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict Trs: { #abs(#0()) -> #0() , #abs(#neg(@x)) -> #pos(@x) , #abs(#pos(@x)) -> #pos(@x) , #abs(#s(@x)) -> #pos(#s(@x)) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertD(@x, @l) -> insertD#1(@l, @x) , insertD#1(::(@y, @ys), @x) -> insertD#2(#less(@y, @x), @x, @y, @ys) , insertD#1(nil(), @x) -> ::(@x, nil()) , insertD#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertD#2(#true(), @x, @y, @ys) -> ::(@y, insertD(@x, @ys)) , insertionsort(@l) -> insertionsort#1(@l) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() , insertionsortD(@l) -> insertionsortD#1(@l) , insertionsortD#1(::(@x, @xs)) -> insertD(@x, insertionsortD(@xs)) , insertionsortD#1(nil()) -> nil() } Weak Trs: { #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We add following dependency tuples: Strict DPs: { #abs^#(#0()) -> c_1() , #abs^#(#neg(@x)) -> c_2() , #abs^#(#pos(@x)) -> c_3() , #abs^#(#s(@x)) -> c_4() , #less^#(@x, @y) -> c_5(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) , insert^#(@x, @l) -> c_6(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_7(insert#2^#(#less(@y, @x), @x, @y, @ys), #less^#(@y, @x)) , insert#1^#(nil(), @x) -> c_8() , insert#2^#(#false(), @x, @y, @ys) -> c_9() , insert#2^#(#true(), @x, @y, @ys) -> c_10(insert^#(@x, @ys)) , insertD^#(@x, @l) -> c_11(insertD#1^#(@l, @x)) , insertD#1^#(::(@y, @ys), @x) -> c_12(insertD#2^#(#less(@y, @x), @x, @y, @ys), #less^#(@y, @x)) , insertD#1^#(nil(), @x) -> c_13() , insertD#2^#(#false(), @x, @y, @ys) -> c_14() , insertD#2^#(#true(), @x, @y, @ys) -> c_15(insertD^#(@x, @ys)) , insertionsort^#(@l) -> c_16(insertionsort#1^#(@l)) , insertionsort#1^#(::(@x, @xs)) -> c_17(insert^#(@x, insertionsort(@xs)), insertionsort^#(@xs)) , insertionsort#1^#(nil()) -> c_18() , insertionsortD^#(@l) -> c_19(insertionsortD#1^#(@l)) , insertionsortD#1^#(::(@x, @xs)) -> c_20(insertD^#(@x, insertionsortD(@xs)), insertionsortD^#(@xs)) , insertionsortD#1^#(nil()) -> c_21() } Weak DPs: { #cklt^#(#EQ()) -> c_34() , #cklt^#(#GT()) -> c_35() , #cklt^#(#LT()) -> c_36() , #compare^#(#0(), #0()) -> c_22() , #compare^#(#0(), #neg(@y)) -> c_23() , #compare^#(#0(), #pos(@y)) -> c_24() , #compare^#(#0(), #s(@y)) -> c_25() , #compare^#(#neg(@x), #0()) -> c_26() , #compare^#(#neg(@x), #neg(@y)) -> c_27(#compare^#(@y, @x)) , #compare^#(#neg(@x), #pos(@y)) -> c_28() , #compare^#(#pos(@x), #0()) -> c_29() , #compare^#(#pos(@x), #neg(@y)) -> c_30() , #compare^#(#pos(@x), #pos(@y)) -> c_31(#compare^#(@x, @y)) , #compare^#(#s(@x), #0()) -> c_32() , #compare^#(#s(@x), #s(@y)) -> c_33(#compare^#(@x, @y)) } and mark the set of starting terms. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { #abs^#(#0()) -> c_1() , #abs^#(#neg(@x)) -> c_2() , #abs^#(#pos(@x)) -> c_3() , #abs^#(#s(@x)) -> c_4() , #less^#(@x, @y) -> c_5(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) , insert^#(@x, @l) -> c_6(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_7(insert#2^#(#less(@y, @x), @x, @y, @ys), #less^#(@y, @x)) , insert#1^#(nil(), @x) -> c_8() , insert#2^#(#false(), @x, @y, @ys) -> c_9() , insert#2^#(#true(), @x, @y, @ys) -> c_10(insert^#(@x, @ys)) , insertD^#(@x, @l) -> c_11(insertD#1^#(@l, @x)) , insertD#1^#(::(@y, @ys), @x) -> c_12(insertD#2^#(#less(@y, @x), @x, @y, @ys), #less^#(@y, @x)) , insertD#1^#(nil(), @x) -> c_13() , insertD#2^#(#false(), @x, @y, @ys) -> c_14() , insertD#2^#(#true(), @x, @y, @ys) -> c_15(insertD^#(@x, @ys)) , insertionsort^#(@l) -> c_16(insertionsort#1^#(@l)) , insertionsort#1^#(::(@x, @xs)) -> c_17(insert^#(@x, insertionsort(@xs)), insertionsort^#(@xs)) , insertionsort#1^#(nil()) -> c_18() , insertionsortD^#(@l) -> c_19(insertionsortD#1^#(@l)) , insertionsortD#1^#(::(@x, @xs)) -> c_20(insertD^#(@x, insertionsortD(@xs)), insertionsortD^#(@xs)) , insertionsortD#1^#(nil()) -> c_21() } Weak DPs: { #cklt^#(#EQ()) -> c_34() , #cklt^#(#GT()) -> c_35() , #cklt^#(#LT()) -> c_36() , #compare^#(#0(), #0()) -> c_22() , #compare^#(#0(), #neg(@y)) -> c_23() , #compare^#(#0(), #pos(@y)) -> c_24() , #compare^#(#0(), #s(@y)) -> c_25() , #compare^#(#neg(@x), #0()) -> c_26() , #compare^#(#neg(@x), #neg(@y)) -> c_27(#compare^#(@y, @x)) , #compare^#(#neg(@x), #pos(@y)) -> c_28() , #compare^#(#pos(@x), #0()) -> c_29() , #compare^#(#pos(@x), #neg(@y)) -> c_30() , #compare^#(#pos(@x), #pos(@y)) -> c_31(#compare^#(@x, @y)) , #compare^#(#s(@x), #0()) -> c_32() , #compare^#(#s(@x), #s(@y)) -> c_33(#compare^#(@x, @y)) } Weak Trs: { #abs(#0()) -> #0() , #abs(#neg(@x)) -> #pos(@x) , #abs(#pos(@x)) -> #pos(@x) , #abs(#s(@x)) -> #pos(#s(@x)) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertD(@x, @l) -> insertD#1(@l, @x) , insertD#1(::(@y, @ys), @x) -> insertD#2(#less(@y, @x), @x, @y, @ys) , insertD#1(nil(), @x) -> ::(@x, nil()) , insertD#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertD#2(#true(), @x, @y, @ys) -> ::(@y, insertD(@x, @ys)) , insertionsort(@l) -> insertionsort#1(@l) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() , insertionsortD(@l) -> insertionsortD#1(@l) , insertionsortD#1(::(@x, @xs)) -> insertD(@x, insertionsortD(@xs)) , insertionsortD#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) Consider the dependency graph 1: #abs^#(#0()) -> c_1() 2: #abs^#(#neg(@x)) -> c_2() 3: #abs^#(#pos(@x)) -> c_3() 4: #abs^#(#s(@x)) -> c_4() 5: #less^#(@x, @y) -> c_5(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) -->_2 #compare^#(#s(@x), #s(@y)) -> c_33(#compare^#(@x, @y)) :36 -->_2 #compare^#(#pos(@x), #pos(@y)) -> c_31(#compare^#(@x, @y)) :34 -->_2 #compare^#(#neg(@x), #neg(@y)) -> c_27(#compare^#(@y, @x)) :30 -->_2 #compare^#(#s(@x), #0()) -> c_32() :35 -->_2 #compare^#(#pos(@x), #neg(@y)) -> c_30() :33 -->_2 #compare^#(#pos(@x), #0()) -> c_29() :32 -->_2 #compare^#(#neg(@x), #pos(@y)) -> c_28() :31 -->_2 #compare^#(#neg(@x), #0()) -> c_26() :29 -->_2 #compare^#(#0(), #s(@y)) -> c_25() :28 -->_2 #compare^#(#0(), #pos(@y)) -> c_24() :27 -->_2 #compare^#(#0(), #neg(@y)) -> c_23() :26 -->_2 #compare^#(#0(), #0()) -> c_22() :25 -->_1 #cklt^#(#LT()) -> c_36() :24 -->_1 #cklt^#(#GT()) -> c_35() :23 -->_1 #cklt^#(#EQ()) -> c_34() :22 6: insert^#(@x, @l) -> c_6(insert#1^#(@l, @x)) -->_1 insert#1^#(::(@y, @ys), @x) -> c_7(insert#2^#(#less(@y, @x), @x, @y, @ys), #less^#(@y, @x)) :7 -->_1 insert#1^#(nil(), @x) -> c_8() :8 7: insert#1^#(::(@y, @ys), @x) -> c_7(insert#2^#(#less(@y, @x), @x, @y, @ys), #less^#(@y, @x)) -->_1 insert#2^#(#true(), @x, @y, @ys) -> c_10(insert^#(@x, @ys)) :10 -->_1 insert#2^#(#false(), @x, @y, @ys) -> c_9() :9 -->_2 #less^#(@x, @y) -> c_5(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :5 8: insert#1^#(nil(), @x) -> c_8() 9: insert#2^#(#false(), @x, @y, @ys) -> c_9() 10: insert#2^#(#true(), @x, @y, @ys) -> c_10(insert^#(@x, @ys)) -->_1 insert^#(@x, @l) -> c_6(insert#1^#(@l, @x)) :6 11: insertD^#(@x, @l) -> c_11(insertD#1^#(@l, @x)) -->_1 insertD#1^#(::(@y, @ys), @x) -> c_12(insertD#2^#(#less(@y, @x), @x, @y, @ys), #less^#(@y, @x)) :12 -->_1 insertD#1^#(nil(), @x) -> c_13() :13 12: insertD#1^#(::(@y, @ys), @x) -> c_12(insertD#2^#(#less(@y, @x), @x, @y, @ys), #less^#(@y, @x)) -->_1 insertD#2^#(#true(), @x, @y, @ys) -> c_15(insertD^#(@x, @ys)) :15 -->_1 insertD#2^#(#false(), @x, @y, @ys) -> c_14() :14 -->_2 #less^#(@x, @y) -> c_5(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) :5 13: insertD#1^#(nil(), @x) -> c_13() 14: insertD#2^#(#false(), @x, @y, @ys) -> c_14() 15: insertD#2^#(#true(), @x, @y, @ys) -> c_15(insertD^#(@x, @ys)) -->_1 insertD^#(@x, @l) -> c_11(insertD#1^#(@l, @x)) :11 16: insertionsort^#(@l) -> c_16(insertionsort#1^#(@l)) -->_1 insertionsort#1^#(::(@x, @xs)) -> c_17(insert^#(@x, insertionsort(@xs)), insertionsort^#(@xs)) :17 -->_1 insertionsort#1^#(nil()) -> c_18() :18 17: insertionsort#1^#(::(@x, @xs)) -> c_17(insert^#(@x, insertionsort(@xs)), insertionsort^#(@xs)) -->_2 insertionsort^#(@l) -> c_16(insertionsort#1^#(@l)) :16 -->_1 insert^#(@x, @l) -> c_6(insert#1^#(@l, @x)) :6 18: insertionsort#1^#(nil()) -> c_18() 19: insertionsortD^#(@l) -> c_19(insertionsortD#1^#(@l)) -->_1 insertionsortD#1^#(::(@x, @xs)) -> c_20(insertD^#(@x, insertionsortD(@xs)), insertionsortD^#(@xs)) :20 -->_1 insertionsortD#1^#(nil()) -> c_21() :21 20: insertionsortD#1^#(::(@x, @xs)) -> c_20(insertD^#(@x, insertionsortD(@xs)), insertionsortD^#(@xs)) -->_2 insertionsortD^#(@l) -> c_19(insertionsortD#1^#(@l)) :19 -->_1 insertD^#(@x, @l) -> c_11(insertD#1^#(@l, @x)) :11 21: insertionsortD#1^#(nil()) -> c_21() 22: #cklt^#(#EQ()) -> c_34() 23: #cklt^#(#GT()) -> c_35() 24: #cklt^#(#LT()) -> c_36() 25: #compare^#(#0(), #0()) -> c_22() 26: #compare^#(#0(), #neg(@y)) -> c_23() 27: #compare^#(#0(), #pos(@y)) -> c_24() 28: #compare^#(#0(), #s(@y)) -> c_25() 29: #compare^#(#neg(@x), #0()) -> c_26() 30: #compare^#(#neg(@x), #neg(@y)) -> c_27(#compare^#(@y, @x)) -->_1 #compare^#(#s(@x), #s(@y)) -> c_33(#compare^#(@x, @y)) :36 -->_1 #compare^#(#pos(@x), #pos(@y)) -> c_31(#compare^#(@x, @y)) :34 -->_1 #compare^#(#s(@x), #0()) -> c_32() :35 -->_1 #compare^#(#pos(@x), #neg(@y)) -> c_30() :33 -->_1 #compare^#(#pos(@x), #0()) -> c_29() :32 -->_1 #compare^#(#neg(@x), #pos(@y)) -> c_28() :31 -->_1 #compare^#(#neg(@x), #neg(@y)) -> c_27(#compare^#(@y, @x)) :30 -->_1 #compare^#(#neg(@x), #0()) -> c_26() :29 -->_1 #compare^#(#0(), #s(@y)) -> c_25() :28 -->_1 #compare^#(#0(), #pos(@y)) -> c_24() :27 -->_1 #compare^#(#0(), #neg(@y)) -> c_23() :26 -->_1 #compare^#(#0(), #0()) -> c_22() :25 31: #compare^#(#neg(@x), #pos(@y)) -> c_28() 32: #compare^#(#pos(@x), #0()) -> c_29() 33: #compare^#(#pos(@x), #neg(@y)) -> c_30() 34: #compare^#(#pos(@x), #pos(@y)) -> c_31(#compare^#(@x, @y)) -->_1 #compare^#(#s(@x), #s(@y)) -> c_33(#compare^#(@x, @y)) :36 -->_1 #compare^#(#s(@x), #0()) -> c_32() :35 -->_1 #compare^#(#pos(@x), #pos(@y)) -> c_31(#compare^#(@x, @y)) :34 -->_1 #compare^#(#pos(@x), #neg(@y)) -> c_30() :33 -->_1 #compare^#(#pos(@x), #0()) -> c_29() :32 -->_1 #compare^#(#neg(@x), #pos(@y)) -> c_28() :31 -->_1 #compare^#(#neg(@x), #neg(@y)) -> c_27(#compare^#(@y, @x)) :30 -->_1 #compare^#(#neg(@x), #0()) -> c_26() :29 -->_1 #compare^#(#0(), #s(@y)) -> c_25() :28 -->_1 #compare^#(#0(), #pos(@y)) -> c_24() :27 -->_1 #compare^#(#0(), #neg(@y)) -> c_23() :26 -->_1 #compare^#(#0(), #0()) -> c_22() :25 35: #compare^#(#s(@x), #0()) -> c_32() 36: #compare^#(#s(@x), #s(@y)) -> c_33(#compare^#(@x, @y)) -->_1 #compare^#(#s(@x), #s(@y)) -> c_33(#compare^#(@x, @y)) :36 -->_1 #compare^#(#s(@x), #0()) -> c_32() :35 -->_1 #compare^#(#pos(@x), #pos(@y)) -> c_31(#compare^#(@x, @y)) :34 -->_1 #compare^#(#pos(@x), #neg(@y)) -> c_30() :33 -->_1 #compare^#(#pos(@x), #0()) -> c_29() :32 -->_1 #compare^#(#neg(@x), #pos(@y)) -> c_28() :31 -->_1 #compare^#(#neg(@x), #neg(@y)) -> c_27(#compare^#(@y, @x)) :30 -->_1 #compare^#(#neg(@x), #0()) -> c_26() :29 -->_1 #compare^#(#0(), #s(@y)) -> c_25() :28 -->_1 #compare^#(#0(), #pos(@y)) -> c_24() :27 -->_1 #compare^#(#0(), #neg(@y)) -> c_23() :26 -->_1 #compare^#(#0(), #0()) -> c_22() :25 Following roots of the dependency graph are removed, as the considered set of starting terms is closed under reduction with respect to these rules (modulo compound contexts). { #abs^#(#0()) -> c_1() , #abs^#(#neg(@x)) -> c_2() , #abs^#(#pos(@x)) -> c_3() , #abs^#(#s(@x)) -> c_4() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { #less^#(@x, @y) -> c_5(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) , insert^#(@x, @l) -> c_6(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_7(insert#2^#(#less(@y, @x), @x, @y, @ys), #less^#(@y, @x)) , insert#1^#(nil(), @x) -> c_8() , insert#2^#(#false(), @x, @y, @ys) -> c_9() , insert#2^#(#true(), @x, @y, @ys) -> c_10(insert^#(@x, @ys)) , insertD^#(@x, @l) -> c_11(insertD#1^#(@l, @x)) , insertD#1^#(::(@y, @ys), @x) -> c_12(insertD#2^#(#less(@y, @x), @x, @y, @ys), #less^#(@y, @x)) , insertD#1^#(nil(), @x) -> c_13() , insertD#2^#(#false(), @x, @y, @ys) -> c_14() , insertD#2^#(#true(), @x, @y, @ys) -> c_15(insertD^#(@x, @ys)) , insertionsort^#(@l) -> c_16(insertionsort#1^#(@l)) , insertionsort#1^#(::(@x, @xs)) -> c_17(insert^#(@x, insertionsort(@xs)), insertionsort^#(@xs)) , insertionsort#1^#(nil()) -> c_18() , insertionsortD^#(@l) -> c_19(insertionsortD#1^#(@l)) , insertionsortD#1^#(::(@x, @xs)) -> c_20(insertD^#(@x, insertionsortD(@xs)), insertionsortD^#(@xs)) , insertionsortD#1^#(nil()) -> c_21() } Weak DPs: { #cklt^#(#EQ()) -> c_34() , #cklt^#(#GT()) -> c_35() , #cklt^#(#LT()) -> c_36() , #compare^#(#0(), #0()) -> c_22() , #compare^#(#0(), #neg(@y)) -> c_23() , #compare^#(#0(), #pos(@y)) -> c_24() , #compare^#(#0(), #s(@y)) -> c_25() , #compare^#(#neg(@x), #0()) -> c_26() , #compare^#(#neg(@x), #neg(@y)) -> c_27(#compare^#(@y, @x)) , #compare^#(#neg(@x), #pos(@y)) -> c_28() , #compare^#(#pos(@x), #0()) -> c_29() , #compare^#(#pos(@x), #neg(@y)) -> c_30() , #compare^#(#pos(@x), #pos(@y)) -> c_31(#compare^#(@x, @y)) , #compare^#(#s(@x), #0()) -> c_32() , #compare^#(#s(@x), #s(@y)) -> c_33(#compare^#(@x, @y)) } Weak Trs: { #abs(#0()) -> #0() , #abs(#neg(@x)) -> #pos(@x) , #abs(#pos(@x)) -> #pos(@x) , #abs(#s(@x)) -> #pos(#s(@x)) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertD(@x, @l) -> insertD#1(@l, @x) , insertD#1(::(@y, @ys), @x) -> insertD#2(#less(@y, @x), @x, @y, @ys) , insertD#1(nil(), @x) -> ::(@x, nil()) , insertD#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertD#2(#true(), @x, @y, @ys) -> ::(@y, insertD(@x, @ys)) , insertionsort(@l) -> insertionsort#1(@l) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() , insertionsortD(@l) -> insertionsortD#1(@l) , insertionsortD#1(::(@x, @xs)) -> insertD(@x, insertionsortD(@xs)) , insertionsortD#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We estimate the number of application of {1,4,5,9,10,14,17} by applications of Pre({1,4,5,9,10,14,17}) = {2,3,7,8,12,15}. Here rules are labeled as follows: DPs: { 1: #less^#(@x, @y) -> c_5(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) , 2: insert^#(@x, @l) -> c_6(insert#1^#(@l, @x)) , 3: insert#1^#(::(@y, @ys), @x) -> c_7(insert#2^#(#less(@y, @x), @x, @y, @ys), #less^#(@y, @x)) , 4: insert#1^#(nil(), @x) -> c_8() , 5: insert#2^#(#false(), @x, @y, @ys) -> c_9() , 6: insert#2^#(#true(), @x, @y, @ys) -> c_10(insert^#(@x, @ys)) , 7: insertD^#(@x, @l) -> c_11(insertD#1^#(@l, @x)) , 8: insertD#1^#(::(@y, @ys), @x) -> c_12(insertD#2^#(#less(@y, @x), @x, @y, @ys), #less^#(@y, @x)) , 9: insertD#1^#(nil(), @x) -> c_13() , 10: insertD#2^#(#false(), @x, @y, @ys) -> c_14() , 11: insertD#2^#(#true(), @x, @y, @ys) -> c_15(insertD^#(@x, @ys)) , 12: insertionsort^#(@l) -> c_16(insertionsort#1^#(@l)) , 13: insertionsort#1^#(::(@x, @xs)) -> c_17(insert^#(@x, insertionsort(@xs)), insertionsort^#(@xs)) , 14: insertionsort#1^#(nil()) -> c_18() , 15: insertionsortD^#(@l) -> c_19(insertionsortD#1^#(@l)) , 16: insertionsortD#1^#(::(@x, @xs)) -> c_20(insertD^#(@x, insertionsortD(@xs)), insertionsortD^#(@xs)) , 17: insertionsortD#1^#(nil()) -> c_21() , 18: #cklt^#(#EQ()) -> c_34() , 19: #cklt^#(#GT()) -> c_35() , 20: #cklt^#(#LT()) -> c_36() , 21: #compare^#(#0(), #0()) -> c_22() , 22: #compare^#(#0(), #neg(@y)) -> c_23() , 23: #compare^#(#0(), #pos(@y)) -> c_24() , 24: #compare^#(#0(), #s(@y)) -> c_25() , 25: #compare^#(#neg(@x), #0()) -> c_26() , 26: #compare^#(#neg(@x), #neg(@y)) -> c_27(#compare^#(@y, @x)) , 27: #compare^#(#neg(@x), #pos(@y)) -> c_28() , 28: #compare^#(#pos(@x), #0()) -> c_29() , 29: #compare^#(#pos(@x), #neg(@y)) -> c_30() , 30: #compare^#(#pos(@x), #pos(@y)) -> c_31(#compare^#(@x, @y)) , 31: #compare^#(#s(@x), #0()) -> c_32() , 32: #compare^#(#s(@x), #s(@y)) -> c_33(#compare^#(@x, @y)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { insert^#(@x, @l) -> c_6(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_7(insert#2^#(#less(@y, @x), @x, @y, @ys), #less^#(@y, @x)) , insert#2^#(#true(), @x, @y, @ys) -> c_10(insert^#(@x, @ys)) , insertD^#(@x, @l) -> c_11(insertD#1^#(@l, @x)) , insertD#1^#(::(@y, @ys), @x) -> c_12(insertD#2^#(#less(@y, @x), @x, @y, @ys), #less^#(@y, @x)) , insertD#2^#(#true(), @x, @y, @ys) -> c_15(insertD^#(@x, @ys)) , insertionsort^#(@l) -> c_16(insertionsort#1^#(@l)) , insertionsort#1^#(::(@x, @xs)) -> c_17(insert^#(@x, insertionsort(@xs)), insertionsort^#(@xs)) , insertionsortD^#(@l) -> c_19(insertionsortD#1^#(@l)) , insertionsortD#1^#(::(@x, @xs)) -> c_20(insertD^#(@x, insertionsortD(@xs)), insertionsortD^#(@xs)) } Weak DPs: { #less^#(@x, @y) -> c_5(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) , #cklt^#(#EQ()) -> c_34() , #cklt^#(#GT()) -> c_35() , #cklt^#(#LT()) -> c_36() , #compare^#(#0(), #0()) -> c_22() , #compare^#(#0(), #neg(@y)) -> c_23() , #compare^#(#0(), #pos(@y)) -> c_24() , #compare^#(#0(), #s(@y)) -> c_25() , #compare^#(#neg(@x), #0()) -> c_26() , #compare^#(#neg(@x), #neg(@y)) -> c_27(#compare^#(@y, @x)) , #compare^#(#neg(@x), #pos(@y)) -> c_28() , #compare^#(#pos(@x), #0()) -> c_29() , #compare^#(#pos(@x), #neg(@y)) -> c_30() , #compare^#(#pos(@x), #pos(@y)) -> c_31(#compare^#(@x, @y)) , #compare^#(#s(@x), #0()) -> c_32() , #compare^#(#s(@x), #s(@y)) -> c_33(#compare^#(@x, @y)) , insert#1^#(nil(), @x) -> c_8() , insert#2^#(#false(), @x, @y, @ys) -> c_9() , insertD#1^#(nil(), @x) -> c_13() , insertD#2^#(#false(), @x, @y, @ys) -> c_14() , insertionsort#1^#(nil()) -> c_18() , insertionsortD#1^#(nil()) -> c_21() } Weak Trs: { #abs(#0()) -> #0() , #abs(#neg(@x)) -> #pos(@x) , #abs(#pos(@x)) -> #pos(@x) , #abs(#s(@x)) -> #pos(#s(@x)) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertD(@x, @l) -> insertD#1(@l, @x) , insertD#1(::(@y, @ys), @x) -> insertD#2(#less(@y, @x), @x, @y, @ys) , insertD#1(nil(), @x) -> ::(@x, nil()) , insertD#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertD#2(#true(), @x, @y, @ys) -> ::(@y, insertD(@x, @ys)) , insertionsort(@l) -> insertionsort#1(@l) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() , insertionsortD(@l) -> insertionsortD#1(@l) , insertionsortD#1(::(@x, @xs)) -> insertD(@x, insertionsortD(@xs)) , insertionsortD#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { #less^#(@x, @y) -> c_5(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) , #cklt^#(#EQ()) -> c_34() , #cklt^#(#GT()) -> c_35() , #cklt^#(#LT()) -> c_36() , #compare^#(#0(), #0()) -> c_22() , #compare^#(#0(), #neg(@y)) -> c_23() , #compare^#(#0(), #pos(@y)) -> c_24() , #compare^#(#0(), #s(@y)) -> c_25() , #compare^#(#neg(@x), #0()) -> c_26() , #compare^#(#neg(@x), #neg(@y)) -> c_27(#compare^#(@y, @x)) , #compare^#(#neg(@x), #pos(@y)) -> c_28() , #compare^#(#pos(@x), #0()) -> c_29() , #compare^#(#pos(@x), #neg(@y)) -> c_30() , #compare^#(#pos(@x), #pos(@y)) -> c_31(#compare^#(@x, @y)) , #compare^#(#s(@x), #0()) -> c_32() , #compare^#(#s(@x), #s(@y)) -> c_33(#compare^#(@x, @y)) , insert#1^#(nil(), @x) -> c_8() , insert#2^#(#false(), @x, @y, @ys) -> c_9() , insertD#1^#(nil(), @x) -> c_13() , insertD#2^#(#false(), @x, @y, @ys) -> c_14() , insertionsort#1^#(nil()) -> c_18() , insertionsortD#1^#(nil()) -> c_21() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { insert^#(@x, @l) -> c_6(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_7(insert#2^#(#less(@y, @x), @x, @y, @ys), #less^#(@y, @x)) , insert#2^#(#true(), @x, @y, @ys) -> c_10(insert^#(@x, @ys)) , insertD^#(@x, @l) -> c_11(insertD#1^#(@l, @x)) , insertD#1^#(::(@y, @ys), @x) -> c_12(insertD#2^#(#less(@y, @x), @x, @y, @ys), #less^#(@y, @x)) , insertD#2^#(#true(), @x, @y, @ys) -> c_15(insertD^#(@x, @ys)) , insertionsort^#(@l) -> c_16(insertionsort#1^#(@l)) , insertionsort#1^#(::(@x, @xs)) -> c_17(insert^#(@x, insertionsort(@xs)), insertionsort^#(@xs)) , insertionsortD^#(@l) -> c_19(insertionsortD#1^#(@l)) , insertionsortD#1^#(::(@x, @xs)) -> c_20(insertD^#(@x, insertionsortD(@xs)), insertionsortD^#(@xs)) } Weak Trs: { #abs(#0()) -> #0() , #abs(#neg(@x)) -> #pos(@x) , #abs(#pos(@x)) -> #pos(@x) , #abs(#s(@x)) -> #pos(#s(@x)) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertD(@x, @l) -> insertD#1(@l, @x) , insertD#1(::(@y, @ys), @x) -> insertD#2(#less(@y, @x), @x, @y, @ys) , insertD#1(nil(), @x) -> ::(@x, nil()) , insertD#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertD#2(#true(), @x, @y, @ys) -> ::(@y, insertD(@x, @ys)) , insertionsort(@l) -> insertionsort#1(@l) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() , insertionsortD(@l) -> insertionsortD#1(@l) , insertionsortD#1(::(@x, @xs)) -> insertD(@x, insertionsortD(@xs)) , insertionsortD#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) Due to missing edges in the dependency-graph, the right-hand sides of following rules could be simplified: { insert#1^#(::(@y, @ys), @x) -> c_7(insert#2^#(#less(@y, @x), @x, @y, @ys), #less^#(@y, @x)) , insertD#1^#(::(@y, @ys), @x) -> c_12(insertD#2^#(#less(@y, @x), @x, @y, @ys), #less^#(@y, @x)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(#less(@y, @x), @x, @y, @ys)) , insert#2^#(#true(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) , insertD^#(@x, @l) -> c_4(insertD#1^#(@l, @x)) , insertD#1^#(::(@y, @ys), @x) -> c_5(insertD#2^#(#less(@y, @x), @x, @y, @ys)) , insertD#2^#(#true(), @x, @y, @ys) -> c_6(insertD^#(@x, @ys)) , insertionsort^#(@l) -> c_7(insertionsort#1^#(@l)) , insertionsort#1^#(::(@x, @xs)) -> c_8(insert^#(@x, insertionsort(@xs)), insertionsort^#(@xs)) , insertionsortD^#(@l) -> c_9(insertionsortD#1^#(@l)) , insertionsortD#1^#(::(@x, @xs)) -> c_10(insertD^#(@x, insertionsortD(@xs)), insertionsortD^#(@xs)) } Weak Trs: { #abs(#0()) -> #0() , #abs(#neg(@x)) -> #pos(@x) , #abs(#pos(@x)) -> #pos(@x) , #abs(#s(@x)) -> #pos(#s(@x)) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertD(@x, @l) -> insertD#1(@l, @x) , insertD#1(::(@y, @ys), @x) -> insertD#2(#less(@y, @x), @x, @y, @ys) , insertD#1(nil(), @x) -> ::(@x, nil()) , insertD#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertD#2(#true(), @x, @y, @ys) -> ::(@y, insertD(@x, @ys)) , insertionsort(@l) -> insertionsort#1(@l) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() , insertionsortD(@l) -> insertionsortD#1(@l) , insertionsortD#1(::(@x, @xs)) -> insertD(@x, insertionsortD(@xs)) , insertionsortD#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We analyse the complexity of following sub-problems (R) and (S). Problem (S) is obtained from the input problem by shifting strict rules from (R) into the weak component: Problem (R): ------------ Strict DPs: { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(#less(@y, @x), @x, @y, @ys)) , insert#2^#(#true(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) , insertionsort^#(@l) -> c_7(insertionsort#1^#(@l)) , insertionsort#1^#(::(@x, @xs)) -> c_8(insert^#(@x, insertionsort(@xs)), insertionsort^#(@xs)) } Weak DPs: { insertD^#(@x, @l) -> c_4(insertD#1^#(@l, @x)) , insertD#1^#(::(@y, @ys), @x) -> c_5(insertD#2^#(#less(@y, @x), @x, @y, @ys)) , insertD#2^#(#true(), @x, @y, @ys) -> c_6(insertD^#(@x, @ys)) , insertionsortD^#(@l) -> c_9(insertionsortD#1^#(@l)) , insertionsortD#1^#(::(@x, @xs)) -> c_10(insertD^#(@x, insertionsortD(@xs)), insertionsortD^#(@xs)) } Weak Trs: { #abs(#0()) -> #0() , #abs(#neg(@x)) -> #pos(@x) , #abs(#pos(@x)) -> #pos(@x) , #abs(#s(@x)) -> #pos(#s(@x)) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertD(@x, @l) -> insertD#1(@l, @x) , insertD#1(::(@y, @ys), @x) -> insertD#2(#less(@y, @x), @x, @y, @ys) , insertD#1(nil(), @x) -> ::(@x, nil()) , insertD#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertD#2(#true(), @x, @y, @ys) -> ::(@y, insertD(@x, @ys)) , insertionsort(@l) -> insertionsort#1(@l) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() , insertionsortD(@l) -> insertionsortD#1(@l) , insertionsortD#1(::(@x, @xs)) -> insertD(@x, insertionsortD(@xs)) , insertionsortD#1(nil()) -> nil() } StartTerms: basic terms Strategy: innermost Problem (S): ------------ Strict DPs: { insertD^#(@x, @l) -> c_4(insertD#1^#(@l, @x)) , insertD#1^#(::(@y, @ys), @x) -> c_5(insertD#2^#(#less(@y, @x), @x, @y, @ys)) , insertD#2^#(#true(), @x, @y, @ys) -> c_6(insertD^#(@x, @ys)) , insertionsortD^#(@l) -> c_9(insertionsortD#1^#(@l)) , insertionsortD#1^#(::(@x, @xs)) -> c_10(insertD^#(@x, insertionsortD(@xs)), insertionsortD^#(@xs)) } Weak DPs: { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(#less(@y, @x), @x, @y, @ys)) , insert#2^#(#true(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) , insertionsort^#(@l) -> c_7(insertionsort#1^#(@l)) , insertionsort#1^#(::(@x, @xs)) -> c_8(insert^#(@x, insertionsort(@xs)), insertionsort^#(@xs)) } Weak Trs: { #abs(#0()) -> #0() , #abs(#neg(@x)) -> #pos(@x) , #abs(#pos(@x)) -> #pos(@x) , #abs(#s(@x)) -> #pos(#s(@x)) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertD(@x, @l) -> insertD#1(@l, @x) , insertD#1(::(@y, @ys), @x) -> insertD#2(#less(@y, @x), @x, @y, @ys) , insertD#1(nil(), @x) -> ::(@x, nil()) , insertD#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertD#2(#true(), @x, @y, @ys) -> ::(@y, insertD(@x, @ys)) , insertionsort(@l) -> insertionsort#1(@l) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() , insertionsortD(@l) -> insertionsortD#1(@l) , insertionsortD#1(::(@x, @xs)) -> insertD(@x, insertionsortD(@xs)) , insertionsortD#1(nil()) -> nil() } StartTerms: basic terms Strategy: innermost Overall, the transformation results in the following sub-problem(s): Generated new problems: ----------------------- R) Strict DPs: { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(#less(@y, @x), @x, @y, @ys)) , insert#2^#(#true(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) , insertionsort^#(@l) -> c_7(insertionsort#1^#(@l)) , insertionsort#1^#(::(@x, @xs)) -> c_8(insert^#(@x, insertionsort(@xs)), insertionsort^#(@xs)) } Weak DPs: { insertD^#(@x, @l) -> c_4(insertD#1^#(@l, @x)) , insertD#1^#(::(@y, @ys), @x) -> c_5(insertD#2^#(#less(@y, @x), @x, @y, @ys)) , insertD#2^#(#true(), @x, @y, @ys) -> c_6(insertD^#(@x, @ys)) , insertionsortD^#(@l) -> c_9(insertionsortD#1^#(@l)) , insertionsortD#1^#(::(@x, @xs)) -> c_10(insertD^#(@x, insertionsortD(@xs)), insertionsortD^#(@xs)) } Weak Trs: { #abs(#0()) -> #0() , #abs(#neg(@x)) -> #pos(@x) , #abs(#pos(@x)) -> #pos(@x) , #abs(#s(@x)) -> #pos(#s(@x)) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertD(@x, @l) -> insertD#1(@l, @x) , insertD#1(::(@y, @ys), @x) -> insertD#2(#less(@y, @x), @x, @y, @ys) , insertD#1(nil(), @x) -> ::(@x, nil()) , insertD#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertD#2(#true(), @x, @y, @ys) -> ::(@y, insertD(@x, @ys)) , insertionsort(@l) -> insertionsort#1(@l) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() , insertionsortD(@l) -> insertionsortD#1(@l) , insertionsortD#1(::(@x, @xs)) -> insertD(@x, insertionsortD(@xs)) , insertionsortD#1(nil()) -> nil() } StartTerms: basic terms Strategy: innermost This problem was proven YES(O(1),O(n^2)). S) Strict DPs: { insertD^#(@x, @l) -> c_4(insertD#1^#(@l, @x)) , insertD#1^#(::(@y, @ys), @x) -> c_5(insertD#2^#(#less(@y, @x), @x, @y, @ys)) , insertD#2^#(#true(), @x, @y, @ys) -> c_6(insertD^#(@x, @ys)) , insertionsortD^#(@l) -> c_9(insertionsortD#1^#(@l)) , insertionsortD#1^#(::(@x, @xs)) -> c_10(insertD^#(@x, insertionsortD(@xs)), insertionsortD^#(@xs)) } Weak DPs: { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(#less(@y, @x), @x, @y, @ys)) , insert#2^#(#true(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) , insertionsort^#(@l) -> c_7(insertionsort#1^#(@l)) , insertionsort#1^#(::(@x, @xs)) -> c_8(insert^#(@x, insertionsort(@xs)), insertionsort^#(@xs)) } Weak Trs: { #abs(#0()) -> #0() , #abs(#neg(@x)) -> #pos(@x) , #abs(#pos(@x)) -> #pos(@x) , #abs(#s(@x)) -> #pos(#s(@x)) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertD(@x, @l) -> insertD#1(@l, @x) , insertD#1(::(@y, @ys), @x) -> insertD#2(#less(@y, @x), @x, @y, @ys) , insertD#1(nil(), @x) -> ::(@x, nil()) , insertD#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertD#2(#true(), @x, @y, @ys) -> ::(@y, insertD(@x, @ys)) , insertionsort(@l) -> insertionsort#1(@l) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() , insertionsortD(@l) -> insertionsortD#1(@l) , insertionsortD#1(::(@x, @xs)) -> insertD(@x, insertionsortD(@xs)) , insertionsortD#1(nil()) -> nil() } StartTerms: basic terms Strategy: innermost This problem was proven YES(O(1),O(n^2)). Proofs for generated problems: ------------------------------ R) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(#less(@y, @x), @x, @y, @ys)) , insert#2^#(#true(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) , insertionsort^#(@l) -> c_7(insertionsort#1^#(@l)) , insertionsort#1^#(::(@x, @xs)) -> c_8(insert^#(@x, insertionsort(@xs)), insertionsort^#(@xs)) } Weak DPs: { insertD^#(@x, @l) -> c_4(insertD#1^#(@l, @x)) , insertD#1^#(::(@y, @ys), @x) -> c_5(insertD#2^#(#less(@y, @x), @x, @y, @ys)) , insertD#2^#(#true(), @x, @y, @ys) -> c_6(insertD^#(@x, @ys)) , insertionsortD^#(@l) -> c_9(insertionsortD#1^#(@l)) , insertionsortD#1^#(::(@x, @xs)) -> c_10(insertD^#(@x, insertionsortD(@xs)), insertionsortD^#(@xs)) } Weak Trs: { #abs(#0()) -> #0() , #abs(#neg(@x)) -> #pos(@x) , #abs(#pos(@x)) -> #pos(@x) , #abs(#s(@x)) -> #pos(#s(@x)) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertD(@x, @l) -> insertD#1(@l, @x) , insertD#1(::(@y, @ys), @x) -> insertD#2(#less(@y, @x), @x, @y, @ys) , insertD#1(nil(), @x) -> ::(@x, nil()) , insertD#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertD#2(#true(), @x, @y, @ys) -> ::(@y, insertD(@x, @ys)) , insertionsort(@l) -> insertionsort#1(@l) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() , insertionsortD(@l) -> insertionsortD#1(@l) , insertionsortD#1(::(@x, @xs)) -> insertD(@x, insertionsortD(@xs)) , insertionsortD#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { insertD^#(@x, @l) -> c_4(insertD#1^#(@l, @x)) , insertD#1^#(::(@y, @ys), @x) -> c_5(insertD#2^#(#less(@y, @x), @x, @y, @ys)) , insertD#2^#(#true(), @x, @y, @ys) -> c_6(insertD^#(@x, @ys)) , insertionsortD^#(@l) -> c_9(insertionsortD#1^#(@l)) , insertionsortD#1^#(::(@x, @xs)) -> c_10(insertD^#(@x, insertionsortD(@xs)), insertionsortD^#(@xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(#less(@y, @x), @x, @y, @ys)) , insert#2^#(#true(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) , insertionsort^#(@l) -> c_7(insertionsort#1^#(@l)) , insertionsort#1^#(::(@x, @xs)) -> c_8(insert^#(@x, insertionsort(@xs)), insertionsort^#(@xs)) } Weak Trs: { #abs(#0()) -> #0() , #abs(#neg(@x)) -> #pos(@x) , #abs(#pos(@x)) -> #pos(@x) , #abs(#s(@x)) -> #pos(#s(@x)) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertD(@x, @l) -> insertD#1(@l, @x) , insertD#1(::(@y, @ys), @x) -> insertD#2(#less(@y, @x), @x, @y, @ys) , insertD#1(nil(), @x) -> ::(@x, nil()) , insertD#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertD#2(#true(), @x, @y, @ys) -> ::(@y, insertD(@x, @ys)) , insertionsort(@l) -> insertionsort#1(@l) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() , insertionsortD(@l) -> insertionsortD#1(@l) , insertionsortD#1(::(@x, @xs)) -> insertD(@x, insertionsortD(@xs)) , insertionsortD#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We replace rewrite rules by usable rules: Weak Usable Rules: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertionsort(@l) -> insertionsort#1(@l) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(#less(@y, @x), @x, @y, @ys)) , insert#2^#(#true(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) , insertionsort^#(@l) -> c_7(insertionsort#1^#(@l)) , insertionsort#1^#(::(@x, @xs)) -> c_8(insert^#(@x, insertionsort(@xs)), insertionsort^#(@xs)) } Weak Trs: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertionsort(@l) -> insertionsort#1(@l) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We decompose the input problem according to the dependency graph into the upper component { insertionsort^#(@l) -> c_7(insertionsort#1^#(@l)) , insertionsort#1^#(::(@x, @xs)) -> c_8(insert^#(@x, insertionsort(@xs)), insertionsort^#(@xs)) } and lower component { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(#less(@y, @x), @x, @y, @ys)) , insert#2^#(#true(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) } Further, following extension rules are added to the lower component. { insertionsort^#(@l) -> insertionsort#1^#(@l) , insertionsort#1^#(::(@x, @xs)) -> insert^#(@x, insertionsort(@xs)) , insertionsort#1^#(::(@x, @xs)) -> insertionsort^#(@xs) } TcT solves the upper component with certificate YES(O(1),O(n^1)). Sub-proof: ---------- We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { insertionsort^#(@l) -> c_7(insertionsort#1^#(@l)) , insertionsort#1^#(::(@x, @xs)) -> c_8(insert^#(@x, insertionsort(@xs)), insertionsort^#(@xs)) } Weak Trs: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertionsort(@l) -> insertionsort#1(@l) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) Due to missing edges in the dependency-graph, the right-hand sides of following rules could be simplified: { insertionsort#1^#(::(@x, @xs)) -> c_8(insert^#(@x, insertionsort(@xs)), insertionsort^#(@xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { insertionsort^#(@l) -> c_1(insertionsort#1^#(@l)) , insertionsort#1^#(::(@x, @xs)) -> c_2(insertionsort^#(@xs)) } Weak Trs: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertionsort(@l) -> insertionsort#1(@l) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) No rule is usable, rules are removed from the input problem. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { insertionsort^#(@l) -> c_1(insertionsort#1^#(@l)) , insertionsort#1^#(::(@x, @xs)) -> c_2(insertionsort^#(@xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 1: insertionsort^#(@l) -> c_1(insertionsort#1^#(@l)) } Sub-proof: ---------- The following argument positions are usable: Uargs(c_1) = {1}, Uargs(c_2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [#0] = [0] [#neg](x1) = [0] [#pos](x1) = [0] [#s](x1) = [0] [#less](x1, x2) = [0] [#compare](x1, x2) = [0] [#cklt](x1) = [0] [insert](x1, x2) = [0] [insert#1](x1, x2) = [0] [::](x1, x2) = [1] x2 + [1] [insert#2](x1, x2, x3, x4) = [0] [nil] = [0] [#false] = [0] [#true] = [0] [insertionsort](x1) = [0] [insertionsort#1](x1) = [0] [#EQ] = [0] [#GT] = [0] [#LT] = [0] [#abs^#](x1) = [0] [#less^#](x1, x2) = [0] [#cklt^#](x1) = [0] [#compare^#](x1, x2) = [0] [insert^#](x1, x2) = [0] [insert#1^#](x1, x2) = [0] [insert#2^#](x1, x2, x3, x4) = [0] [insertD^#](x1, x2) = [0] [insertD#1^#](x1, x2) = [0] [insertD#2^#](x1, x2, x3, x4) = [0] [insertionsort^#](x1) = [1] x1 + [1] [insertionsort#1^#](x1) = [1] x1 + [0] [insertionsortD^#](x1) = [0] [insertionsortD#1^#](x1) = [0] [c_7](x1) = [0] [c_8](x1, x2) = [0] [c] = [0] [c_1](x1) = [1] x1 + [0] [c_2](x1) = [1] x1 + [0] This order satisfies following ordering constraints [insertionsort^#(@l)] = [1] @l + [1] > [1] @l + [0] = [c_1(insertionsort#1^#(@l))] [insertionsort#1^#(::(@x, @xs))] = [1] @xs + [1] >= [1] @xs + [1] = [c_2(insertionsort^#(@xs))] Consider the set of all dependency pairs DPs: { 1: insertionsort^#(@l) -> c_1(insertionsort#1^#(@l)) , 2: insertionsort#1^#(::(@x, @xs)) -> c_2(insertionsort^#(@xs)) } Processor 'matrix interpretation of dimension 1' induces the complexity certificate YES(?,O(n^1)) on application of dependency pairs {1}. These cover all (indirect) predecessors of dependency pairs {1,2}, their number of application is equally bounded. The dependency pairs are shifted into the corresponding weak component(s). We apply the transformation 'removetails' on the sub-problem: Weak DPs: { insertionsort^#(@l) -> c_1(insertionsort#1^#(@l)) , insertionsort#1^#(::(@x, @xs)) -> c_2(insertionsort^#(@xs)) } StartTerms: basic terms Strategy: innermost The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { insertionsort^#(@l) -> c_1(insertionsort#1^#(@l)) , insertionsort#1^#(::(@x, @xs)) -> c_2(insertionsort^#(@xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Rules: Empty Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(#less(@y, @x), @x, @y, @ys)) , insert#2^#(#true(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) } Weak DPs: { insertionsort^#(@l) -> insertionsort#1^#(@l) , insertionsort#1^#(::(@x, @xs)) -> insert^#(@x, insertionsort(@xs)) , insertionsort#1^#(::(@x, @xs)) -> insertionsort^#(@xs) } Weak Trs: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertionsort(@l) -> insertionsort#1(@l) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 2: insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(#less(@y, @x), @x, @y, @ys)) , 5: insertionsort#1^#(::(@x, @xs)) -> insert^#(@x, insertionsort(@xs)) , 6: insertionsort#1^#(::(@x, @xs)) -> insertionsort^#(@xs) } Trs: { #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() } Sub-proof: ---------- The following argument positions are usable: Uargs(c_1) = {1}, Uargs(c_2) = {1}, Uargs(c_3) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [#0] = [1] [#neg](x1) = [1] x1 + [0] [#pos](x1) = [1] x1 + [1] [#s](x1) = [1] x1 + [0] [#less](x1, x2) = [1] [#compare](x1, x2) = [1] x1 + [1] x2 + [1] [#cklt](x1) = [1] [insert](x1, x2) = [1] x2 + [1] [insert#1](x1, x2) = [1] x1 + [1] [::](x1, x2) = [1] x2 + [1] [insert#2](x1, x2, x3, x4) = [1] x1 + [1] x4 + [1] [nil] = [0] [#false] = [1] [#true] = [1] [insertionsort](x1) = [1] x1 + [0] [insertionsort#1](x1) = [1] x1 + [0] [#EQ] = [0] [#GT] = [0] [#LT] = [0] [#abs^#](x1) = [0] [#less^#](x1, x2) = [0] [#cklt^#](x1) = [0] [#compare^#](x1, x2) = [0] [insert^#](x1, x2) = [1] x2 + [0] [insert#1^#](x1, x2) = [1] x1 + [0] [insert#2^#](x1, x2, x3, x4) = [1] x4 + [0] [insertD^#](x1, x2) = [0] [insertD#1^#](x1, x2) = [0] [insertD#2^#](x1, x2, x3, x4) = [0] [insertionsort^#](x1) = [1] x1 + [0] [insertionsort#1^#](x1) = [1] x1 + [0] [insertionsortD^#](x1) = [0] [insertionsortD#1^#](x1) = [0] [c_1](x1) = [1] x1 + [0] [c_2](x1) = [1] x1 + [0] [c_3](x1) = [1] x1 + [0] This order satisfies following ordering constraints [#less(@x, @y)] = [1] >= [1] = [#cklt(#compare(@x, @y))] [#cklt(#EQ())] = [1] >= [1] = [#false()] [#cklt(#GT())] = [1] >= [1] = [#false()] [#cklt(#LT())] = [1] >= [1] = [#true()] [insert(@x, @l)] = [1] @l + [1] >= [1] @l + [1] = [insert#1(@l, @x)] [insert#1(::(@y, @ys), @x)] = [1] @ys + [2] >= [1] @ys + [2] = [insert#2(#less(@y, @x), @x, @y, @ys)] [insert#1(nil(), @x)] = [1] >= [1] = [::(@x, nil())] [insert#2(#false(), @x, @y, @ys)] = [1] @ys + [2] >= [1] @ys + [2] = [::(@x, ::(@y, @ys))] [insert#2(#true(), @x, @y, @ys)] = [1] @ys + [2] >= [1] @ys + [2] = [::(@y, insert(@x, @ys))] [insertionsort(@l)] = [1] @l + [0] >= [1] @l + [0] = [insertionsort#1(@l)] [insertionsort#1(::(@x, @xs))] = [1] @xs + [1] >= [1] @xs + [1] = [insert(@x, insertionsort(@xs))] [insertionsort#1(nil())] = [0] >= [0] = [nil()] [insert^#(@x, @l)] = [1] @l + [0] >= [1] @l + [0] = [c_1(insert#1^#(@l, @x))] [insert#1^#(::(@y, @ys), @x)] = [1] @ys + [1] > [1] @ys + [0] = [c_2(insert#2^#(#less(@y, @x), @x, @y, @ys))] [insert#2^#(#true(), @x, @y, @ys)] = [1] @ys + [0] >= [1] @ys + [0] = [c_3(insert^#(@x, @ys))] [insertionsort^#(@l)] = [1] @l + [0] >= [1] @l + [0] = [insertionsort#1^#(@l)] [insertionsort#1^#(::(@x, @xs))] = [1] @xs + [1] > [1] @xs + [0] = [insert^#(@x, insertionsort(@xs))] [insertionsort#1^#(::(@x, @xs))] = [1] @xs + [1] > [1] @xs + [0] = [insertionsort^#(@xs)] Consider the set of all dependency pairs DPs: { 1: insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , 2: insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(#less(@y, @x), @x, @y, @ys)) , 3: insert#2^#(#true(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) , 4: insertionsort^#(@l) -> insertionsort#1^#(@l) , 5: insertionsort#1^#(::(@x, @xs)) -> insert^#(@x, insertionsort(@xs)) , 6: insertionsort#1^#(::(@x, @xs)) -> insertionsort^#(@xs) } Processor 'matrix interpretation of dimension 1' induces the complexity certificate YES(?,O(n^1)) on application of dependency pairs {2,5,6}. These cover all (indirect) predecessors of dependency pairs {1,2,3,4,5,6}, their number of application is equally bounded. The dependency pairs are shifted into the corresponding weak component(s). We apply the transformation 'removetails' on the sub-problem: Weak DPs: { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(#less(@y, @x), @x, @y, @ys)) , insert#2^#(#true(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) , insertionsort^#(@l) -> insertionsort#1^#(@l) , insertionsort#1^#(::(@x, @xs)) -> insert^#(@x, insertionsort(@xs)) , insertionsort#1^#(::(@x, @xs)) -> insertionsort^#(@xs) } Weak Trs: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertionsort(@l) -> insertionsort#1(@l) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() } StartTerms: basic terms Strategy: innermost The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(#less(@y, @x), @x, @y, @ys)) , insert#2^#(#true(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) , insertionsort^#(@l) -> insertionsort#1^#(@l) , insertionsort#1^#(::(@x, @xs)) -> insert^#(@x, insertionsort(@xs)) , insertionsort#1^#(::(@x, @xs)) -> insertionsort^#(@xs) } We apply the transformation 'usablerules' on the sub-problem: Weak Trs: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertionsort(@l) -> insertionsort#1(@l) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() } StartTerms: basic terms Strategy: innermost No rule is usable, rules are removed from the input problem. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Rules: Empty Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded Wall-time: 9.9145e-2s CPU-time: 0.965s Wall-time: 0.693214s CPU-time: 6.637s S) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { insertD^#(@x, @l) -> c_4(insertD#1^#(@l, @x)) , insertD#1^#(::(@y, @ys), @x) -> c_5(insertD#2^#(#less(@y, @x), @x, @y, @ys)) , insertD#2^#(#true(), @x, @y, @ys) -> c_6(insertD^#(@x, @ys)) , insertionsortD^#(@l) -> c_9(insertionsortD#1^#(@l)) , insertionsortD#1^#(::(@x, @xs)) -> c_10(insertD^#(@x, insertionsortD(@xs)), insertionsortD^#(@xs)) } Weak DPs: { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(#less(@y, @x), @x, @y, @ys)) , insert#2^#(#true(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) , insertionsort^#(@l) -> c_7(insertionsort#1^#(@l)) , insertionsort#1^#(::(@x, @xs)) -> c_8(insert^#(@x, insertionsort(@xs)), insertionsort^#(@xs)) } Weak Trs: { #abs(#0()) -> #0() , #abs(#neg(@x)) -> #pos(@x) , #abs(#pos(@x)) -> #pos(@x) , #abs(#s(@x)) -> #pos(#s(@x)) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertD(@x, @l) -> insertD#1(@l, @x) , insertD#1(::(@y, @ys), @x) -> insertD#2(#less(@y, @x), @x, @y, @ys) , insertD#1(nil(), @x) -> ::(@x, nil()) , insertD#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertD#2(#true(), @x, @y, @ys) -> ::(@y, insertD(@x, @ys)) , insertionsort(@l) -> insertionsort#1(@l) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() , insertionsortD(@l) -> insertionsortD#1(@l) , insertionsortD#1(::(@x, @xs)) -> insertD(@x, insertionsortD(@xs)) , insertionsortD#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(#less(@y, @x), @x, @y, @ys)) , insert#2^#(#true(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) , insertionsort^#(@l) -> c_7(insertionsort#1^#(@l)) , insertionsort#1^#(::(@x, @xs)) -> c_8(insert^#(@x, insertionsort(@xs)), insertionsort^#(@xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { insertD^#(@x, @l) -> c_4(insertD#1^#(@l, @x)) , insertD#1^#(::(@y, @ys), @x) -> c_5(insertD#2^#(#less(@y, @x), @x, @y, @ys)) , insertD#2^#(#true(), @x, @y, @ys) -> c_6(insertD^#(@x, @ys)) , insertionsortD^#(@l) -> c_9(insertionsortD#1^#(@l)) , insertionsortD#1^#(::(@x, @xs)) -> c_10(insertD^#(@x, insertionsortD(@xs)), insertionsortD^#(@xs)) } Weak Trs: { #abs(#0()) -> #0() , #abs(#neg(@x)) -> #pos(@x) , #abs(#pos(@x)) -> #pos(@x) , #abs(#s(@x)) -> #pos(#s(@x)) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertD(@x, @l) -> insertD#1(@l, @x) , insertD#1(::(@y, @ys), @x) -> insertD#2(#less(@y, @x), @x, @y, @ys) , insertD#1(nil(), @x) -> ::(@x, nil()) , insertD#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertD#2(#true(), @x, @y, @ys) -> ::(@y, insertD(@x, @ys)) , insertionsort(@l) -> insertionsort#1(@l) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() , insertionsortD(@l) -> insertionsortD#1(@l) , insertionsortD#1(::(@x, @xs)) -> insertD(@x, insertionsortD(@xs)) , insertionsortD#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We replace rewrite rules by usable rules: Weak Usable Rules: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insertD(@x, @l) -> insertD#1(@l, @x) , insertD#1(::(@y, @ys), @x) -> insertD#2(#less(@y, @x), @x, @y, @ys) , insertD#1(nil(), @x) -> ::(@x, nil()) , insertD#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertD#2(#true(), @x, @y, @ys) -> ::(@y, insertD(@x, @ys)) , insertionsortD(@l) -> insertionsortD#1(@l) , insertionsortD#1(::(@x, @xs)) -> insertD(@x, insertionsortD(@xs)) , insertionsortD#1(nil()) -> nil() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { insertD^#(@x, @l) -> c_4(insertD#1^#(@l, @x)) , insertD#1^#(::(@y, @ys), @x) -> c_5(insertD#2^#(#less(@y, @x), @x, @y, @ys)) , insertD#2^#(#true(), @x, @y, @ys) -> c_6(insertD^#(@x, @ys)) , insertionsortD^#(@l) -> c_9(insertionsortD#1^#(@l)) , insertionsortD#1^#(::(@x, @xs)) -> c_10(insertD^#(@x, insertionsortD(@xs)), insertionsortD^#(@xs)) } Weak Trs: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insertD(@x, @l) -> insertD#1(@l, @x) , insertD#1(::(@y, @ys), @x) -> insertD#2(#less(@y, @x), @x, @y, @ys) , insertD#1(nil(), @x) -> ::(@x, nil()) , insertD#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertD#2(#true(), @x, @y, @ys) -> ::(@y, insertD(@x, @ys)) , insertionsortD(@l) -> insertionsortD#1(@l) , insertionsortD#1(::(@x, @xs)) -> insertD(@x, insertionsortD(@xs)) , insertionsortD#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We decompose the input problem according to the dependency graph into the upper component { insertionsortD^#(@l) -> c_9(insertionsortD#1^#(@l)) , insertionsortD#1^#(::(@x, @xs)) -> c_10(insertD^#(@x, insertionsortD(@xs)), insertionsortD^#(@xs)) } and lower component { insertD^#(@x, @l) -> c_4(insertD#1^#(@l, @x)) , insertD#1^#(::(@y, @ys), @x) -> c_5(insertD#2^#(#less(@y, @x), @x, @y, @ys)) , insertD#2^#(#true(), @x, @y, @ys) -> c_6(insertD^#(@x, @ys)) } Further, following extension rules are added to the lower component. { insertionsortD^#(@l) -> insertionsortD#1^#(@l) , insertionsortD#1^#(::(@x, @xs)) -> insertD^#(@x, insertionsortD(@xs)) , insertionsortD#1^#(::(@x, @xs)) -> insertionsortD^#(@xs) } TcT solves the upper component with certificate YES(O(1),O(n^1)). Sub-proof: ---------- We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { insertionsortD^#(@l) -> c_9(insertionsortD#1^#(@l)) , insertionsortD#1^#(::(@x, @xs)) -> c_10(insertD^#(@x, insertionsortD(@xs)), insertionsortD^#(@xs)) } Weak Trs: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insertD(@x, @l) -> insertD#1(@l, @x) , insertD#1(::(@y, @ys), @x) -> insertD#2(#less(@y, @x), @x, @y, @ys) , insertD#1(nil(), @x) -> ::(@x, nil()) , insertD#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertD#2(#true(), @x, @y, @ys) -> ::(@y, insertD(@x, @ys)) , insertionsortD(@l) -> insertionsortD#1(@l) , insertionsortD#1(::(@x, @xs)) -> insertD(@x, insertionsortD(@xs)) , insertionsortD#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) Due to missing edges in the dependency-graph, the right-hand sides of following rules could be simplified: { insertionsortD#1^#(::(@x, @xs)) -> c_10(insertD^#(@x, insertionsortD(@xs)), insertionsortD^#(@xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { insertionsortD^#(@l) -> c_1(insertionsortD#1^#(@l)) , insertionsortD#1^#(::(@x, @xs)) -> c_2(insertionsortD^#(@xs)) } Weak Trs: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insertD(@x, @l) -> insertD#1(@l, @x) , insertD#1(::(@y, @ys), @x) -> insertD#2(#less(@y, @x), @x, @y, @ys) , insertD#1(nil(), @x) -> ::(@x, nil()) , insertD#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertD#2(#true(), @x, @y, @ys) -> ::(@y, insertD(@x, @ys)) , insertionsortD(@l) -> insertionsortD#1(@l) , insertionsortD#1(::(@x, @xs)) -> insertD(@x, insertionsortD(@xs)) , insertionsortD#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) No rule is usable, rules are removed from the input problem. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { insertionsortD^#(@l) -> c_1(insertionsortD#1^#(@l)) , insertionsortD#1^#(::(@x, @xs)) -> c_2(insertionsortD^#(@xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 1: insertionsortD^#(@l) -> c_1(insertionsortD#1^#(@l)) } Sub-proof: ---------- The following argument positions are usable: Uargs(c_1) = {1}, Uargs(c_2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [#0] = [0] [#neg](x1) = [0] [#pos](x1) = [0] [#s](x1) = [0] [#less](x1, x2) = [0] [#compare](x1, x2) = [0] [#cklt](x1) = [0] [::](x1, x2) = [1] x2 + [1] [nil] = [0] [#false] = [0] [#true] = [0] [insertD](x1, x2) = [0] [insertD#1](x1, x2) = [0] [insertD#2](x1, x2, x3, x4) = [0] [insertionsortD](x1) = [0] [insertionsortD#1](x1) = [0] [#EQ] = [0] [#GT] = [0] [#LT] = [0] [#abs^#](x1) = [0] [#less^#](x1, x2) = [0] [#cklt^#](x1) = [0] [#compare^#](x1, x2) = [0] [insert^#](x1, x2) = [0] [insert#1^#](x1, x2) = [0] [insert#2^#](x1, x2, x3, x4) = [0] [insertD^#](x1, x2) = [0] [insertD#1^#](x1, x2) = [0] [insertD#2^#](x1, x2, x3, x4) = [0] [insertionsort^#](x1) = [0] [insertionsort#1^#](x1) = [0] [insertionsortD^#](x1) = [1] x1 + [1] [insertionsortD#1^#](x1) = [1] x1 + [0] [c_9](x1) = [0] [c_10](x1, x2) = [0] [c] = [0] [c_1](x1) = [1] x1 + [0] [c_2](x1) = [1] x1 + [0] This order satisfies following ordering constraints [insertionsortD^#(@l)] = [1] @l + [1] > [1] @l + [0] = [c_1(insertionsortD#1^#(@l))] [insertionsortD#1^#(::(@x, @xs))] = [1] @xs + [1] >= [1] @xs + [1] = [c_2(insertionsortD^#(@xs))] Consider the set of all dependency pairs DPs: { 1: insertionsortD^#(@l) -> c_1(insertionsortD#1^#(@l)) , 2: insertionsortD#1^#(::(@x, @xs)) -> c_2(insertionsortD^#(@xs)) } Processor 'matrix interpretation of dimension 1' induces the complexity certificate YES(?,O(n^1)) on application of dependency pairs {1}. These cover all (indirect) predecessors of dependency pairs {1,2}, their number of application is equally bounded. The dependency pairs are shifted into the corresponding weak component(s). We apply the transformation 'removetails' on the sub-problem: Weak DPs: { insertionsortD^#(@l) -> c_1(insertionsortD#1^#(@l)) , insertionsortD#1^#(::(@x, @xs)) -> c_2(insertionsortD^#(@xs)) } StartTerms: basic terms Strategy: innermost The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { insertionsortD^#(@l) -> c_1(insertionsortD#1^#(@l)) , insertionsortD#1^#(::(@x, @xs)) -> c_2(insertionsortD^#(@xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Rules: Empty Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { insertD^#(@x, @l) -> c_4(insertD#1^#(@l, @x)) , insertD#1^#(::(@y, @ys), @x) -> c_5(insertD#2^#(#less(@y, @x), @x, @y, @ys)) , insertD#2^#(#true(), @x, @y, @ys) -> c_6(insertD^#(@x, @ys)) } Weak DPs: { insertionsortD^#(@l) -> insertionsortD#1^#(@l) , insertionsortD#1^#(::(@x, @xs)) -> insertD^#(@x, insertionsortD(@xs)) , insertionsortD#1^#(::(@x, @xs)) -> insertionsortD^#(@xs) } Weak Trs: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insertD(@x, @l) -> insertD#1(@l, @x) , insertD#1(::(@y, @ys), @x) -> insertD#2(#less(@y, @x), @x, @y, @ys) , insertD#1(nil(), @x) -> ::(@x, nil()) , insertD#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertD#2(#true(), @x, @y, @ys) -> ::(@y, insertD(@x, @ys)) , insertionsortD(@l) -> insertionsortD#1(@l) , insertionsortD#1(::(@x, @xs)) -> insertD(@x, insertionsortD(@xs)) , insertionsortD#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 2: insertD#1^#(::(@y, @ys), @x) -> c_5(insertD#2^#(#less(@y, @x), @x, @y, @ys)) , 6: insertionsortD#1^#(::(@x, @xs)) -> insertionsortD^#(@xs) } Trs: { #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() } Sub-proof: ---------- The following argument positions are usable: Uargs(c_4) = {1}, Uargs(c_5) = {1}, Uargs(c_6) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [#0] = [1] [#neg](x1) = [1] x1 + [0] [#pos](x1) = [1] x1 + [1] [#s](x1) = [1] x1 + [0] [#less](x1, x2) = [1] [#compare](x1, x2) = [1] x1 + [1] x2 + [1] [#cklt](x1) = [1] [::](x1, x2) = [1] x2 + [1] [nil] = [0] [#false] = [1] [#true] = [1] [insertD](x1, x2) = [1] x2 + [1] [insertD#1](x1, x2) = [1] x1 + [1] [insertD#2](x1, x2, x3, x4) = [1] x1 + [1] x4 + [1] [insertionsortD](x1) = [1] x1 + [0] [insertionsortD#1](x1) = [1] x1 + [0] [#EQ] = [0] [#GT] = [0] [#LT] = [0] [#abs^#](x1) = [0] [#less^#](x1, x2) = [0] [#cklt^#](x1) = [0] [#compare^#](x1, x2) = [0] [insert^#](x1, x2) = [0] [insert#1^#](x1, x2) = [0] [insert#2^#](x1, x2, x3, x4) = [0] [insertD^#](x1, x2) = [1] x2 + [1] [insertD#1^#](x1, x2) = [1] x1 + [1] [insertD#2^#](x1, x2, x3, x4) = [1] x4 + [1] [insertionsort^#](x1) = [0] [insertionsort#1^#](x1) = [0] [insertionsortD^#](x1) = [1] x1 + [0] [insertionsortD#1^#](x1) = [1] x1 + [0] [c_4](x1) = [1] x1 + [0] [c_5](x1) = [1] x1 + [0] [c_6](x1) = [1] x1 + [0] This order satisfies following ordering constraints [#less(@x, @y)] = [1] >= [1] = [#cklt(#compare(@x, @y))] [#cklt(#EQ())] = [1] >= [1] = [#false()] [#cklt(#GT())] = [1] >= [1] = [#false()] [#cklt(#LT())] = [1] >= [1] = [#true()] [insertD(@x, @l)] = [1] @l + [1] >= [1] @l + [1] = [insertD#1(@l, @x)] [insertD#1(::(@y, @ys), @x)] = [1] @ys + [2] >= [1] @ys + [2] = [insertD#2(#less(@y, @x), @x, @y, @ys)] [insertD#1(nil(), @x)] = [1] >= [1] = [::(@x, nil())] [insertD#2(#false(), @x, @y, @ys)] = [1] @ys + [2] >= [1] @ys + [2] = [::(@x, ::(@y, @ys))] [insertD#2(#true(), @x, @y, @ys)] = [1] @ys + [2] >= [1] @ys + [2] = [::(@y, insertD(@x, @ys))] [insertionsortD(@l)] = [1] @l + [0] >= [1] @l + [0] = [insertionsortD#1(@l)] [insertionsortD#1(::(@x, @xs))] = [1] @xs + [1] >= [1] @xs + [1] = [insertD(@x, insertionsortD(@xs))] [insertionsortD#1(nil())] = [0] >= [0] = [nil()] [insertD^#(@x, @l)] = [1] @l + [1] >= [1] @l + [1] = [c_4(insertD#1^#(@l, @x))] [insertD#1^#(::(@y, @ys), @x)] = [1] @ys + [2] > [1] @ys + [1] = [c_5(insertD#2^#(#less(@y, @x), @x, @y, @ys))] [insertD#2^#(#true(), @x, @y, @ys)] = [1] @ys + [1] >= [1] @ys + [1] = [c_6(insertD^#(@x, @ys))] [insertionsortD^#(@l)] = [1] @l + [0] >= [1] @l + [0] = [insertionsortD#1^#(@l)] [insertionsortD#1^#(::(@x, @xs))] = [1] @xs + [1] >= [1] @xs + [1] = [insertD^#(@x, insertionsortD(@xs))] [insertionsortD#1^#(::(@x, @xs))] = [1] @xs + [1] > [1] @xs + [0] = [insertionsortD^#(@xs)] Consider the set of all dependency pairs DPs: { 1: insertD^#(@x, @l) -> c_4(insertD#1^#(@l, @x)) , 2: insertD#1^#(::(@y, @ys), @x) -> c_5(insertD#2^#(#less(@y, @x), @x, @y, @ys)) , 3: insertD#2^#(#true(), @x, @y, @ys) -> c_6(insertD^#(@x, @ys)) , 4: insertionsortD^#(@l) -> insertionsortD#1^#(@l) , 5: insertionsortD#1^#(::(@x, @xs)) -> insertD^#(@x, insertionsortD(@xs)) , 6: insertionsortD#1^#(::(@x, @xs)) -> insertionsortD^#(@xs) } Processor 'matrix interpretation of dimension 1' induces the complexity certificate YES(?,O(n^1)) on application of dependency pairs {2,6}. These cover all (indirect) predecessors of dependency pairs {1,2,3,4,5,6}, their number of application is equally bounded. The dependency pairs are shifted into the corresponding weak component(s). We apply the transformation 'removetails' on the sub-problem: Weak DPs: { insertD^#(@x, @l) -> c_4(insertD#1^#(@l, @x)) , insertD#1^#(::(@y, @ys), @x) -> c_5(insertD#2^#(#less(@y, @x), @x, @y, @ys)) , insertD#2^#(#true(), @x, @y, @ys) -> c_6(insertD^#(@x, @ys)) , insertionsortD^#(@l) -> insertionsortD#1^#(@l) , insertionsortD#1^#(::(@x, @xs)) -> insertD^#(@x, insertionsortD(@xs)) , insertionsortD#1^#(::(@x, @xs)) -> insertionsortD^#(@xs) } Weak Trs: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insertD(@x, @l) -> insertD#1(@l, @x) , insertD#1(::(@y, @ys), @x) -> insertD#2(#less(@y, @x), @x, @y, @ys) , insertD#1(nil(), @x) -> ::(@x, nil()) , insertD#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertD#2(#true(), @x, @y, @ys) -> ::(@y, insertD(@x, @ys)) , insertionsortD(@l) -> insertionsortD#1(@l) , insertionsortD#1(::(@x, @xs)) -> insertD(@x, insertionsortD(@xs)) , insertionsortD#1(nil()) -> nil() } StartTerms: basic terms Strategy: innermost The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { insertD^#(@x, @l) -> c_4(insertD#1^#(@l, @x)) , insertD#1^#(::(@y, @ys), @x) -> c_5(insertD#2^#(#less(@y, @x), @x, @y, @ys)) , insertD#2^#(#true(), @x, @y, @ys) -> c_6(insertD^#(@x, @ys)) , insertionsortD^#(@l) -> insertionsortD#1^#(@l) , insertionsortD#1^#(::(@x, @xs)) -> insertD^#(@x, insertionsortD(@xs)) , insertionsortD#1^#(::(@x, @xs)) -> insertionsortD^#(@xs) } We apply the transformation 'usablerules' on the sub-problem: Weak Trs: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , insertD(@x, @l) -> insertD#1(@l, @x) , insertD#1(::(@y, @ys), @x) -> insertD#2(#less(@y, @x), @x, @y, @ys) , insertD#1(nil(), @x) -> ::(@x, nil()) , insertD#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertD#2(#true(), @x, @y, @ys) -> ::(@y, insertD(@x, @ys)) , insertionsortD(@l) -> insertionsortD#1(@l) , insertionsortD#1(::(@x, @xs)) -> insertD(@x, insertionsortD(@xs)) , insertionsortD#1(nil()) -> nil() } StartTerms: basic terms Strategy: innermost No rule is usable, rules are removed from the input problem. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Rules: Empty Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded Wall-time: 9.8326e-2s CPU-time: 0.961s Wall-time: 0.704954s CPU-time: 6.747s Hurray, we answered YES(O(1),O(n^2))